<?php

/**
 * Student form.
 *
 * @package    Projecte Final de Carrera
 * @subpackage form
 * @author     Jaume Fernandez
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class StudentForm extends BaseStudentForm {

    public function configure() {
        //This will be created in the code
        
        $this->validatorSchema->setOption('allow_extra_fields',true); 
        
        $this->widgetSchema['first name'] = new sfWidgetFormInputText();
        $this->validatorSchema['first name'] = new sfValidatorString();

        $this->widgetSchema['last name'] = new sfWidgetFormInputText();
        $this->validatorSchema['last name'] = new sfValidatorString();

        $this->widgetSchema['username'] = new sfWidgetFormInputText();
        $this->validatorSchema['username'] = new sfValidatorString();

        $this->widgetSchema['password'] = new sfWidgetFormInputPassword();
        $this->validatorSchema['password'] = new sfValidatorString();


        $this->getWidgetSchema()->setPositions(array(
            'id',
            'user_id',
            'first name',
            'last name',
            'username',
            'password',
            'birthday',
            'curriculum_id'
        ));

        unset($this['user_id']);
    }


}
